package com.isesol.ime.rest.api;

import com.isesol.api.rest.annoations.*;
import com.isesol.api.rest.model.base.*;
import com.isesol.ime.*;
import com.isesol.ime.service.*;
import org.springframework.stereotype.*;
import org.springframework.transaction.annotation.*;

import javax.annotation.*;
import java.util.*;

/**
 * 机床参数类别管理
 * <p>
 * <li> 获取所有机床参数类别
 * </p>
 *
 * @author peter zhang
 */
@Service
@RestServiceClass(url = "category")
public class CategoryResource extends BusinessResources{

	@Resource
	CategoryService categoryService;

	@Transactional
	@RestServiceMethod(url = "getAll", requestType = BaseRestRequest.class)
	public Map getAll(BaseRestRequest request) throws Exception{

		LOGGER.info(Constant.MODEL_NAME_CATEGORY+"getAll接口调用,request={}", request);

		return categoryService.findAll();
	}

}
